home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Rice_CMS / gopher24 / gopcligv.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1992-12-26  |  2.0 KB  |  65 lines

  1. /*
  2.  *        Name: GOPCLIGV REXX
  3.  *              VM TCP/IP Network GOPHER Client graphics viewer
  4.  *              This file is part of CMS Gopher and not part of VMGIF.
  5.  *      Author: Rick Troth, Rice University, Information Systems
  6.  *        Date: 1992-Dec-23
  7.  *
  8.  *        Note: the first record must be at least long enough
  9.  *              to identify the graphics format (magic number)
  10.  */
  11.  
  12. /*
  13.  *      Copyright 1992 Richard M. Troth.   This software was developed
  14.  *      with resources provided by Rice University and is intended
  15.  *      to serve Rice's user community.   Rice has benefitted greatly
  16.  *      from the free distribution of software,  therefore distribution
  17.  *      of unmodified copies of this material is not restricted.
  18.  *      You may change your own copy as needed.   Neither Rice
  19.  *      University nor any of its employees or students shall be held
  20.  *      liable for damages resulting from the use of this software.
  21.  */
  22.  
  23. /*  Trace "OFF"  */
  24.  
  25. 'PEEKTO RECORD'
  26. Select
  27.     When Left(record,5) = '4749463837'x Then Signal GIF
  28.     Otherwise 'OUTPUT' "unknown graphics format"
  29.     End  /*  Select  */
  30.  
  31. Exit rc * (rc ^= 12)
  32.  
  33.  
  34.  
  35. /* ------------------------------------------------------------------ */
  36. GIF:
  37.  
  38. /*  verify that we have the VMGIF disk accessed  */
  39. 'CALLPIPE CMS STATE VMGIF MODULE * | *:'
  40. If rc ^= 0 Then Exit rc
  41.  
  42. /*  try to stash the input stream in a temp file  */
  43. 'CALLPIPE *: | > TEMP#GIF GIF A3'
  44. If rc ^= 0 Then Do
  45.     grc = rc
  46.     'CALLPIPE COMMAND ERASE TEMP#GIF GIF A'
  47.     Exit grc
  48.     End  /*  If  ..  Do  */
  49.  
  50. /*  ensure that the right libraries are GLOBALed  */
  51. /*  (I loathe doing this)  */
  52. 'CALLPIPE COMMAND QUERY TXTLIB' ,
  53.     '| STRIP LEADING STRING /TXTLIB   = / | JOIN * | VAR TXTLIB'
  54. Upper txtlib;   If Strip(txtlib) = "NONE" Then txtlib = ""
  55. 'CALLPIPE COMMAND GLOBAL TXTLIB ADMPLIB ADMGLIB' txtlib
  56.  
  57. /*  now run VMGIF  */
  58. 'CALLPIPE CMS VMGIF -em5 TEMP#GIF | *:'; grc = rc
  59.  
  60. /*  restore GLOBALed libraries  */
  61. 'CALLPIPE COMMAND GLOBAL TXTLIB' txtlib
  62.  
  63. Exit grc
  64.  
  65.